Skip to content

Conversation

erikhfj
Copy link
Member

@erikhfj erikhfj commented Nov 18, 2026

Closes #91

What was done

  • Updated the search() helper in e2e/tests/search.spec.ts to use getByRole('button', { name: 'Search', exact: true }) so it no longer collides with Clear recent searches once search history is recorded.
  • Added exact: true to the Filters and Filters (1) button locators in e2e/tests/search.spec.ts to avoid potential substring matches with Clear filters.
  • Cleared the fixed E2E_USER_ID user's recorded search history after returning to Discover in the journey test so repeated runs start with clean history.

What was tested

  • pnpm format:check && pnpm lint && pnpm typecheck && pnpm test — passed (client: 20 test files / 202 tests passed; server: 8 unit test files / 81 tests passed, 5 PostgreSQL-backed files / 56 tests skipped locally with TEST_DATABASE_URL unset).
  • pnpm test:e2e run twice consecutively against a throwaway local PostgreSQL cluster migrated and seeded with db:seed, API server, and Vite dev server (E2E_BASE_URL=http://localhost:5179/project2/):
    • Run 1: 7 passed (21.0s)
    • Run 2: 7 passed (18.8s)

@erikhfj erikhfj requested a review from a team as a code owner November 18, 2026 00:28
Copy link
Member

@rachelks rachelks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The exact button locators resolve the ambiguity, and the search history cleanup looks good too. The relevant checks are passing. Approved! 😊

@rachelks rachelks merged commit 85f4098 into main Nov 20, 2026
3 checks passed
@rachelks rachelks deleted the fix/91-e2e-search-button-locator branch November 20, 2026 12:31
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E search helper matches the clear-history button
2 participants